from django.db import models
from django.contrib.auth.models import User
from ckeditor.fields import RichTextField


class TimeCapsule(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE)
    title = models.CharField(max_length=255)
    message = RichTextField()
    opening_date = models.DateTimeField()
    is_public = models.BooleanField(default=False)
    created_at = models.DateTimeField(auto_now_add=True)

    def __str__(self):
        return self.title


from django.db import models

# Create your models here.
